import React, { useEffect } from 'react'
import './index.scss'

import { createBrowserHistory } from "history"; // 回退历史 下面调用这个组件之后可以进行打印这个history

const Com = () => {
  useEffect(() => { //函数组件再请求数据的时候则是用这个useEffect，
    // 这里是请求数据然后渲染第二个ul
  }, [])
  const history = createBrowserHistory()
  return (
    <div className='container'>
      <header className='signin_header'>
        <img src="/images/u735.png" alt="" onClick={() => { //点击跳转到之前的进入的页面
          console.log(history)
          history.goBack(-1)
        }} />
        <p>课程签到</p>
      </header>
      <div className='signin_content'>
        <ul className='content_signin_th'>
          <li>序</li>
          <li>学生姓名</li>
          <li>签到状态</li>
          <li>操作</li>
        </ul>
        <ul className='content_signin_list'>
          <li className='content_signin_list_li'>
            <span>1</span>
            <span>刘小牛</span>
            <span>未签到</span>
            <span>签到</span>
          </li>
          <li className='content_signin_list_li' >
            <span>2</span>
            <span>黄小杰</span>
            <span>未签到</span>
            <span>签到</span>
          </li>
          <li>3</li>
          <li>4</li>
        </ul>
      </div>
      <footer className='signin_footer'>
        <div className='signin_footer_left'>
          <span className='signin_footer_left_course'>思想品德</span>
          <span className='signin_footer_left_num'>|24/29</span>
        </div>
        <div className='signin_footer_right'>一键签到</div>
      </footer>
    </div>
  )
}

export default Com